package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-05-19
 * Time: 12:28
 */
public class OutClass {
    public static int a = 10;
    public int b = 2;
    private int c = 3;
    public int g = 0;

    //静态内部类
      static class InnerClass {
        public int d = 1;
        private int e = 6;
        private static int f = 0;

        //静态内部类里不可以，访问外部非静态成员变量,需要访问就得实例化对象，来访问
        public void print() {
            System.out.println(a);
        }
    }

    public static void main(String[] args) {
        OutClass.InnerClass innerClass = new OutClass.InnerClass();
        innerClass.print();
    }

}
